﻿using DocumentFormat.OpenXml.Lite.PresentationML.Presentation.Base;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.PresentationML.Presentation.SlideElements
{
    [XmlRoot("control", Namespace = Constants.Presentation)]
    public class Control : XmlSerializable
    {
        [XmlAttribute("spid", Form = XmlSchemaForm.Qualified)]
        public string ShapeId { get; set; }

        [Optional]
        [XmlAttribute("name", Form = XmlSchemaForm.Qualified)]
        public string Name { get; set; }

        [Optional]
        [XmlAttribute("showAsIcon", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> ShowAsIcon { get; set; }

        [Optional]
        [XmlAttribute("id", Namespace = Constants.Relationship, Form = XmlSchemaForm.Qualified)]
        public string RelationshipId { get; set; }

        [Optional]
        [XmlAttribute("imgW", Form = XmlSchemaForm.Qualified)]
        public Nullable<int> ImageWidth { get; set; }

        [Optional]
        [XmlAttribute("imgH", Form = XmlSchemaForm.Qualified)]
        public Nullable<int> ImageHeight { get; set; }

        [Optional]
        [XmlElement("extLst", Namespace = Constants.Presentation)]
        public ExtensionList ExtensionList { get; set; }

        public Control() { }
    }
}
